﻿@model ywxt.NewsPush.Models.News.PageModelNewsIndex
@using ywxt.NewsPush.Models;
@{
    ViewBag.Title = "网站新闻扫描";
}

<div class="page-header">
    <h1>
        @ViewBag.Title
        <small>
            最新扫描的网站新闻列表
        </small>
    </h1>
</div>
<form class="form-inline">
    <!--
    <label>
        网站：
        <select class="form-control">
            <option></option>
        </select>
    </label>
        -->
    <label>
        关键字：
        <input class="form-control" name="keyword" />
    </label>
    <button type="submit" class="btn btn-primary">查询</button>
</form>
<div class="list-group">
    @foreach (var c in Model.News)
    {
        <a href="@c.url" class="list-group-item" target="_blank">
            <h4 class="list-group-item-heading">@c.title</h4>
            <p class="list-group-item-text">
                [
                @if (c.date.HasValue)
                {
                    @c.date.Value.ToString("yyyy-MM-dd HH:mm");
                }
                else
                {
                    <span>无</span>
                }
                ]
                @c.siteName
            </p>
        </a>
    }
</div>
@Html.BootstrapPager(Model.pageSetting.currentPage, index => Url.Action("Index", "News", new { pageIndex = index }), Model.pageSetting.totalItems, pageSize: Model.pageSetting.pageSize, numberOfLinks: Model.pageSetting.numberOfLinks)